Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General | Off-site
[ :: Read More :: ]

the product of an afternoon

Cart #wormthing-1 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#96986 2021-09-07 04:06
[ :: Read More :: ]

Cart #last_battle_of_angry_square-0 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


Angry Square must hold out as long as it can in its Last Battle against inevitable square-shaped oblivion.

P#96983 2021-09-07 02:22
[ :: Read More :: ]

PICO-8 0.2.3 is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.

This update is focused on resolving runtime issues, with a couple of small but handy features thrown in for good measure:

Lucky Draw

To grab 32 random cartridges from the BBS, there is now a 'Lucky Draw' list in SPLORE. It is more likely to select cartridges that have more stars, but even unrated carts have a decent chance of appearing. Perhaps this will be a way to unearth some undiscovered gems, or just to find something new to play without scrolling back through several years of carts.

The list is cached, so it only changes every 2 minutes or so. But you can keep paging through the list to get new items forever.

Live Token / Character Count

Select some text in the code editor to view how many characters or tokens are contained within.

Shorthand Print Statements

The shorthand version of print (?"hello") used to require no preceding statement be on the same line, but you can now mix it with things like the shorthand IF statement, as long as it is the last thing on the line:

-- PLAY A SOUND EFFECT WHEN HIT
IF (PGET(X,Y)>0) HIT=1 ?"\ADAF"

Thanks to @Liquidream for suggesting this. It should be handy for things like tweetcarts and PICO-1K Jam (which coincidentally is also organized by Liquidream!)

New Manual

The PICO-8 Manual is still a work in progress, but it went through a large update last month, with new formatting, dark mode, linkable headers, and more printer-friendly. You can find it on the resources page:

https://www.lexaloffle.com/pico-8.php?page=resources

The changelog has been separated into a text file here:

https://www.lexaloffle.com/dl/docs/pico-8_changelog.txt

The pico-8.txt included in the distributables has changed to a short version that links to the online manual, but later on I'll bring back the full ascii version and keep it in sync with the html version.

.P8.ROM Format

This isn't a very useful feature unless you are manipulating PICO-8 cartridges with external tools, but it has always irked me that it is not possible to write 32k of PICO-8 cartridge to a file that is 32k!

> SAVE FOO32K.P8.ROM
SAVED FOO32K.P8.ROM
> LOAD FOO32K.P8.ROM
LOADED FOO32K.P8.ROM (0 CHARS)

Majestic.

Large Numbers

tostr() and tonum() now take format flags that make it easier to deal with large numbers.

https://www.lexaloffle.com/dl/docs/pico-8_manual.html#TOSTR

PICO-8's numbers are all 16:16 fixed point, which basically means that every number is internally stored as a large 32-bit integer that is divided by 65536 to get the value in Lua. So for example, if you want to use that large integer for something like scores that need to go above the usual maximum of 32767, bit 0x2 can be used to display it in the raw integer form:

?TOSTR(3, 0x2)
196608
?TONUM("196608", 0x2)
3

To add 10 points to a score stored in this way, you'd need to shift it right 16 bits:

SCORE += 10>>16

CPU Counting

0.2.3 contains two changed to cpu costs which does not effect many cartridges:

  1. In 0.2.2c, it was cheaper to write "local a=0+b" than "local a=b" and also "local a=0-b" than "local a=-b". This is because the Lua vm instruction for addition was cheaper than local assignment (OP_MOVE), and for unary minus (OP_UNM). The best solution I could find was simply to reduce the cost of those two instructions to 1 cycle instead of 2, resulting in a slight speed increase in some cases.

  2. peeking or poking multiple values in 0.2.2c did not cost any additional cpu, so doing something like: poke4(0,peek4(0x1000,0x1000)) was completely free! The same line in 0.2.3 now costs the same as doing an equivalent memcpy.

Future Plans

Next up for PICO-8 is a 64-bit Raspberry Pi Build, and also a preview of a web version that is also handy for running PICO-8 on Chromebooks. I'm also still working on online scores, which required developing some bespoke infrastructure that is optimised for PICO-8's usage patterns, and can handle traffic from exported carts without needing to start charging for PICONET subscriptions or anything like that. I'll test it next month with the release of https://www.doodlemud.com, which is a multiplayer drawing game designed to battletest PICO-8's backend before exposing it to precious cartridge data!

Changelog


v0.2.3

Added: Lucky draw list in splore -- gives a random selection of carts
Added: load/save carts in .p8.rom format (raw binary 32k block)
Added: tostr(), tonum() take format_flags parameter to convert to and from 32-bit signed ints
Added: ord(str, pos, num) returns num results starting from character at pos (similar to peek)
Added: FOLDER takes an optional parameter to open other host directories: BACKUPS | DESKTOP | CONFIG | BBS
Added: Live character / token count of selected text shown at bottom right of code editor
Changed: Removed collaboration list from splore (can still search for sub:collab)
Changed: 0x808 audio has a slight lpf filter on it by default // turn off by setting bit 0x20 at 0x5f36
Changed: tonum(boolean_value) returns 1 or 0 instead of nil
Changed: cursor CR x position set only by print(str,x,y) or cursor(), but not by print(str) (0x5f24)
Changed: character wrap is on by default when using print(str)
Changed: force-pause-menu hold duration is 500ms instead of 300ms to prevent accidentally triggering it
Changed: default gif length for new install is 16 seconds
Changed: ? shorthand can be used anywhere on a line e.g. if (true) ?"yes"
Changed: allow while/if shorthand with no statement, using colon separator: WHILE(BTN()==0);
Changed: added warning to fullscreen_method 2 in config.txt (gives erratic behaviour under some drivers)
Changed: cheaper OP_MOVE, OP_UNM lua vm instructions so that e.g. "local a=0-b" is not faster than "local a=-b"
Fixed: peek() / poke() do not charge extra cpu when reading or writing multiple values
Fixed: fget(n) returns junk when n is out of range (0..255); should return 0 in that case
Fixed: dropped .PNG files not detected as images when filename uses uppercase extension
Fixed: line()/tline() illegal writes caused by faulty clipping when (x1-x0) or (y1-y0) >= 0x8000
Fixed: -accept_future 1 only worked with .p8.png files; now also applies to .p8
Fixed: ?"\a7f" does not play f (happens only when f is the first note)
Fixed: abs(0x8000) return 0x0.0001 (should be 0x7fff.ffff)
Fixed: parameter string (stat(6)) is dropped when passed via RUN command
Fixed: preprocessing of form: "x += x<0 and -1 or 1" broken for operators <, >
Fixed: tab not accepted as whitespace for some preprocessor operations
Fixed: stat(1) wraps around when cpu is >= 2.0 (regression in 0.2.2)
Fixed: pressing SHIFT+ENTER on "local function foo()" or after "if (..) else" doesn't insert "end"
Fixed: pal() does not reset secondary palette to system default
Fixed: 0x808 audio does not respect pausing / volume / is not recorded with extcmd("audio_rec")
Fixed: 'h' pressed in sprite editor toggles hex mode in map editor
Fixed: After pressing shift-tab to toggle 128x128 map view, active draw area is still only 128x112
Fixed: Attempt to navigate to non-existant tab after running: function _update60() _update60=nil end
Fixed: stat(101) not returning cart id when running from BBS web player
Fixed: print() wrapping + scrolling; e.g. from commandline: while(true) print(chr(254+rnd(2)).."\0")
Fixed: integer divide assignment operator (\=) costs 2 tokens instead of 1

P#96897 2021-09-06 21:26
[ :: Read More :: ]

Cart #monty_hall-0 | 2021-09-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

A simulation of the famous Monty Hall Problem inspired by the game show "The Price is Right."

The game goes like this:
0) 3 doors, 1 has a pile of gold coins behind it
1) You pick 1 of the 3 doors
2) Monty Hall, the show's host, opens 1 of the 2 remaining doors, revealing that it is empty
3) You are offered the chance to switch to the remaining closed door
4) All 3 doors are opened and you receive what's behind the door you ended on

The Problem:
What is the probability of winning if you switch?
What is the probability of winning if you stay?
Is it always better to switch or stay? A little of both?
Does it matter whether you switch or stay?

This cart allows you to run many trials while tracking the wins and losses to determine what the true probability is.
This is an example of a Monte Carlo simulation; experiments are repeated quickly over a long enough period to find the true probability of an event occurring. Obviously, Monte Carlo sims can give some pretty inaccurate results at first, but they get better over time based on the Law of Large Numbers.

Hope you enjoy, and thanks for playing!

P#96969 2021-09-06 20:16
[ :: Read More :: ]

Hey guys,

There's an Alakajam! event scheduled for the 17-19th September week-end!

If you don't know about us, we're an online gamedev community hosting jams, where you are invited to make a game from scratch over 48 hours. Start/end times are suited to European timezones (7pm UTC), while both the theme and the winners are decided by the community! As I write the theme submission phase has just started, and you will be able to suggest ideas for one week. The full jam works this way:

You can discover the winners from the last jams here</a>. PICO-8 has been a popular engine throughout the events, some of them even winning the solo category :)

More than the thrill of the competition, a cool thing is that all games are getting valuable feedback for their games thanks to our voting/comment system.

If you're interested feel free to check in, we also have a Discord & an IRC chan. See you there!

P#96967 2021-09-06 19:42
[ :: Read More :: ]
P#96959 2021-09-06 15:52
[ :: Read More :: ]

In version 0.2.3 the _lua_ tag is no longer inserted at the top of the file when saving a new cart. External editor does not syntax highlight until put in.

P#96958 2021-09-06 15:20 ( Edited 2021-09-06 15:21)
[ :: Read More :: ]

Cart #mkusyhi-0 | 2021-09-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

Hey there! this is my first pico-8 game :) any feedback is appreciated.

Premise

Galaxy defender is a arcade style shoot em up there are 4 different types that act differently but the more difficult they are, more points you get.

Controls

-X to shoot
-Arrow keys to move

P#96942 2021-09-06 11:05
[ :: Read More :: ]

Cart #hello_kromah-1 | 2021-09-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Hello :)
I finally gave a go at Pico-8 this week end and here's a little hello world contribution.
I hope creating a thread for a not-actual game project is still accepted!

Very exciting for upcoming projects as well as discovering more of yours!

P#96941 2021-09-06 09:34 ( Edited 2021-09-06 12:41)
[ :: Read More :: ]

I was working on a new project that involved learning how rom cartridges worked, so I asked around for help and someone suggested that I use SD cards. I ended up liking the idea and decided to use that in my current Pico 8 fanmade handheld project as well. What I did was created a shell that goes around a SD card to give it a cartridge look and feel. A USB SD card reader will read the 'cartridges'. I also wrote a bash script that will search for a p8.png file in your SD card directory and have Pico 8 run that file or run splore instead if no SD card cartridge was connected. Firstly, when you plug in a SD card to your card reader, you should type in

sudo fdisk -l

. This should list your SD card. Mine was listed as /dev/sda1

I then mounted the SD card and made sure Pico 8 could run the file. While in my Pico 8 directory, I typed in

./pico8 -run /media/usb0/run.p8.png

and Pico 8 ran the file, but use whatever directory you mount your SD card in. Why did I call the cartridge run.p8.png? I tried just using

./pico8 -run /media/usb0/*p8.png

, but I thought, if I had multiple cartridges on the same SD card, it would pick one out of random, and I didn't want that, especially for multicart games. Maybe there is a better way at doing this. If there is, please let me know. I made it where the first cartridge can be called run.p8.png, but other cartridges can be called whatever you want. I modified /etc/rc.local and added a line before the screen driver where it would mount the SD card. For me, I put in

sudo mount /dev/sda1 /media/usb0

I then created a bash script that would either load a game from a SD card cartridge or run splore if there was no cartridge connected.

Here is the bash script below: I named it autorunpico8.sh, but you can call it whatever you want.

#!/bin/bash
if [ -f "/media/usb0/run.p8.png" ]
then
exec /home/pi/pico-8/pico8 -run /media/usb0/run.p8.png &
else
exec /home/pi/pico-8/pico8 -splore &
fi
exit 0

Once you create the file, you will want to make it executable by typing in

chmod +x yourscripthere.sh

Test out the script and see if it works. If it does, put the script in /etc/rc.local above exit 0 at the bottom of the file.

When you turn on your Raspberry Pi, Pico 8 will load the cartridge.

When there is no 'cartridge' connected to your SD card reader it boots into splore, but if you really want to, you can make a 100% offline system and make it only look for cartridges.

I will upload the cartridge shells on my Thingiverse page soon enough. The front of the cartridge shell allows you to use custom artwork and you can modify the top text to be anything you want. You slide in a SD card and if it isn't a snug fit, hot glue gun might help keep it in place. The back plate of the cartridge can be removed so you can remove the SD card if it stops working. I hope this tutorial is useful and these cartridges can be used in your Pico 8 projects. Have a wonderful day.

P#96936 2021-09-06 05:24 ( Edited 2021-09-06 16:06)
[ :: Read More :: ]

@zep
This problem has happened to me multiple times now where I'm doing music in the sfx editor, (and the pattern editor maybe?)
And I hit cmd+r.
Pico-8 crashes immediately and I've checked my backups folder to find this time nothing was saved...
I'm not sure if it's because I don't have any code and I just made a cart to do music in, and it doesn't happen all of the time when you run, but when it does happen it crashes and you lose everything :(

I'm not sure how to recreate it but if you could find it please squash this bug/crash, thanks.

I'm on mac, version 0.1.12c

P#96934 2021-09-06 04:21 ( Edited 2022-02-23 15:03)
[ :: Read More :: ]

The Clockwork DevTerm is a small portable computer with ultra-wide screen, miniature keyboard, built-in gamepad keys, and a thermal printer. You can buy one configured with a Raspberry Pi core that can run PICO-8 (among other things). I recently live-tweeted my unboxing and set-up. This post is a summary of my review of the device, and PICO-8 set-up instructions.

Clockwork also makes the GameShell, a portable Game Boy-like gaming device. Both DevTerm and GameShell are designed as modular kits that you assemble. As with GameShell, the hardware designs and software for DevTerm are open source. The parts are high quality, the modules are well designed for reuse and expansion, and assembly instructions are easy and clear. The modular design, the breezy assembly process, and the iconic side knobs set the tone: this is your machine, and you can open it at any time.

Stock warning: As of this writing, you can buy the RaspPi version of DevTerm for $219 USD, but this does not include the RaspPi CM3+ Lite core. These seem to be difficult to find at the moment, probably due to the infamous pandemic chip shortage. DevTerm does nothing without this core, so know what you're buying.

You will also need two (2) 18650 rechargeable batteries, a USB charger capable of outputting 2 watts, and a cable with a USB-C connector. The batteries charge while inside the unit.

Both DevTerm and GameShell can run PICO-8. A while back I wrote a PICO-8 on GameShell tutorial that Clockwork subsequently semi-automated and built into their launcher app (thanks Clockwork!). DevTerm doesn't have PICO-8 specific software, but it runs PICO-8 cleanly due to being based directly on a Raspberry Pi core. I have included some details below.

DevTerm is a fully capable Raspberry Pi machine. The reams of RaspPi support material on the Internet make it easy to learn how to do things with your DevTerm. Whether the hardware is up to your favorite RaspPi tasks is another question.

The DevTerm hardware

(Photo credit: Clockwork)

The most important thing to know about DevTerm is that it is small: 7-3/4" wide, 6" deep, and 1-1/2" tall at its highest point. The wide screen and two-tone design of the case recall the vintage Tandy TRS-80 M100 portable (1983), which was famous for its comfortable keyboard. In terms of size, DevTerm is not that. Most official photos do not include other objects that indicate scale, though credit to Clockwork for posting this photo set back in June 2021. To get a sense of the size of the keys from the photos, look at the gamepad buttons in the upper right of the keyboard, and notice that the letter keys are about the same size.

As miniature keyboards go, DevTerm's keyboard is great. The keys are responsive for typing purposes and satisfying to press. I manage to use both hands to type, though at a fraction of my usual speed due to the cramped size. I have minor quibbles with the layout: the tab and enter keys are under-sized and dominated by the escape and backspace keys, and the meta keys are small and inset. In this form factor, you want to use meta keys for text editing and keyboard navigation of apps, so putting Ctrl fully left would have been useful.

For mousing, DevTerm has a trackball and several mouse-button keys. Performance is reasonable for selecting windows and icons. I found it unreliable for drawing art, but it'll do in a pinch. I'd pack a portable external mouse for extended sessions. With default settings, mouse travel is pretty slow and it takes some tedious effort to get the pointer from one side of the screen to the other.

Just above the typing keys are gamepad buttons: four directional buttons on the left, and four action buttons (ABXY) on the right. Here again the layout just misses expectations. I would prefer a traditional D-pad rocker to the bifurcated square thing, and the action buttons are not in a cross orientation. The gamepad buttons are more comfortable for playing games than the letter keys, so I'm glad they're there.

I made brief demo videos of typing, mousing, and gaming on the DevTerm keyboard so you can get a sense of it (Twitter will make you scroll down to see these, sorry):

The screen is amusingly wide at 1280x480 pixels, enough for PICO-8 on one side and VS Code, a YouTube tutorial, or the Wiki on the other side. Viewing angles are good, including the most important angle of keeping the device flat on a table surface while seated. The unavoidable geometric distortion does make me wish it had about 10 more degrees of tilt. Maybe I'm getting old, but small type and low contrast color combinations are difficult to read. In a sense, PICO-8 is great for this because its letters are big and chunky compared to some apps at default font sizes.

I have two minor concerns with the display: glare and fingerprints. You'll want to control what light sources are in front of you that might reflect into your eyes. And you might want to carry a microfiber cloth to wipe away smudges. I wonder if a screen protector cut to size might help, though I'd worry about the impact on viewing angle.

You get three USB-A ports, a charging-only USB-C port, a micro HDMI port for an external display, and a standard 1/8" stereo headphone jack. I haven't tested the HDMI port. The headphone jack sounds great. It also has little built-in speakers, with the performance you'd expect for their size. There's no hardware volume control, but X Windows has a volume slider in the menu bar.

The power button is on the front, with subtle lights indicating whether it is turned on or charging. The power button is smart enough to shut down the machine without confusing the OS into thinking it crashed, like some RaspPi power switches do. The default start-up sequence is unceremonious with no Clockwork logo or splash screen, and you might think it didn't work for a few seconds, but after that it boots impressively quickly into X Windows.

All software lives on a 16 GB microSD card that's included with the kit and pre-formatted with Raspian Linux. I was very pleased that I didn't need to mess with writing an OS image to the card as with most Raspberry Pi set-ups. You can turn DevTerm on with USB power the moment you finish assembly.

For one last charming flourish, DevTerm includes a built-in 2-1/4" thermal printer. It takes standard calculator thermal paper. Clockwork has a CUPS driver for the printer that you can install so that it works with all standard Linux software. The distinctive orange paper holder is removable and has its own storage cap, and a door covers its access port. Once the novelty of the printer has worn off, you can disconnect it and pretend it isn't there.

DevTerm and PICO-8

Does DevTerm run PICO-8? Of course it does!

You install PICO-8 like you would with any other Raspberry Pi system.

  1. Open a web browser. (It's the "globe" icon in the Raspian menu bar.)
  2. If you purchased PICO-8 directly from Lexaloffle, visit https://www.lexaloffle.com/ and sign in with your account. Click your username to open the menu, select Downloads. Locate the PICO-8 Raspberry Pi version, then click "zip" to download. (If you purchased PICO-8 from Humble Bundle, Itch.io, or another vendor, follow their instructions to download the latest Raspberry Pi version.)
  3. Open the file explorer (the "folder" icon in the Raspian menu bar), then navigate to Downloads to find the file you downloaded. Double-click to open the .zip file, then click the Extract files button and follow the prompts to select a location for the pico-8 folder. I keep mine in the pi home folder.

To launch PICO-8, navigate to the pico-8 folder, double-click the pico8 icon, then click Execute. (The process for adding PICO-8 to the Application menu or the Application Launch Bar is a bit involved, so I won't go into that here.)

Alternatively, you can start PICO-8 from the command line by executing the pico8 command:

~/pico-8/pico8

Note: The rest of these instructions assume some familiarity with the Linux command line. To get to a command prompt, click the "terminal window" icon in the Raspian menu bar.

PICO-8 full screen and windowed modes

By default, PICO-8 opens to take up the full screen. You can press Alt+Tab to switch between applications while PICO-8 is running. You can close PICO-8 by giving it the SHUTDOWN command, or by pressing Alt+Space to open the window menu then selecting Close.

It is important to remember that PICO-8 hides the mouse cursor when it is full screen and in console mode or game playing mode. In other modes, it'll show the cursor, but only if the cursor is positioned in PICO-8's square display area. This is a special problem for DevTerm because the mouse could be anywhere on its wide screen, and the trackball moves it so slowly that it can be frustrating to find it just by moving it blindly. Instead, press Alt+Space to open the window menu and reveal the cursor, move the cursor into the PICO-8 area, then press Escape to close the menu.

To have PICO-8 open in a window instead of full screen, you can use a command line option when starting PICO-8, like so:

~/pico-8/pico8 -windowed 1

You can tell PICO-8 to open in a window every time by updating its configuration file. This file is located at the path ~/.lexaloffle/pico-8/config.txt. (It is not in the pico-8 directory with the app.) Open this file in a text editor, such as the pico editor (no relation) that's included with Raspian:

pico -w ~/.lexaloffle/pico-8/config.txt

I recommend the following settings for running PICO-8 windowed on DevTerm. This puts the window on the right side of the screen and obscures the borders.

window_size 478 478

windowed 1

window_position 808 -26

To position the window centered on the screen with the window bar visible, use this window_position:

window_position 430 0

Save the file then exit the editor: in the pico editor, save with Ctrl-O and press enter when prompted for a filename, then exit with Ctrl-X. Quit PICO-8 if it is running, then restart it to pick up the new settings.

When PICO-8 uses the automatic window size (0 0) and position (-1 -1), Raspian opens a window that's a bit too big for DevTerm. Moreover, the window borders are obscured, so you can't drag them to resize! To reposition the PICO-8 window when this happens:

  1. Press Alt+Space to open the window menu, then select Move.
  2. Use the trackball to move the window down so you can see the window bar, then click the left mouse button to release the window.
  3. Drag a corner to resize the window.

Setting up the gamepad buttons

The DevTerm gamepad buttons work with PICO-8, but not out of the box. You must configure them with the SDL controllermap utility and PICO-8's controller configuration file.

Open this article in a browser on your DevTerm, then copy the configuration line from here:

03000000af1e00002400000010010000,ClockworkPI DevTerm,platform:Linux,a:b2,b:b1,x:b3,y:b0,leftx:a0,lefty:a1,

Select the complete line (from "03000..." to "...lefty:a1," which might be hidden off the right side of the box as it appears on the BBS) and copy it to the clipboard (Ctrl+C from a browser). Back at the command prompt, open the PICO-8 controller configuration file in an editor:

pico -w ~/.lexaloffle/pico-8/sdl_controllers.txt

Move to the bottom of the file then paste the line (Shift+Ctrl+V). Save and exit. Quit and restart PICO-8, if needed.

I generated the configuration line using the controllermap utility that comes with SDL. This is not installed by default. If you want to try this utility yourself, execute these commands in a Terminal window to download, build, and run the controllermap utility:

wget http://libsdl.org/release/SDL2-2.0.7.tar.gz
tar -zxvf SDL2-2.0.7.tar.gz
cd SDL2-2.0.7/test
./configure
make controllermap
./controllermap 0

The last command runs the tool and opens a graphical interface. Press the indicated buttons for the directional pad and action buttons, and press Space for the rest. The tool prints the configuration line to the Terminal window then exits. Select the text in the terminal window, then use Shift+Ctrl+C to copy it to the clipboard. Paste it into the configuration file, as above.

Try it with Splore! Type SPLORE (or just S) at the PICO-8 command prompt and play some games with the gamepad buttons.

Setting up... the printer?

You can print to the thermal printer from any app that knows how to print. If you're using the version of Linux that came on the SD card included with the DevTerm, you already have the printer driver installed. You can test print a simple message like so:

echo "Hi DevTerm!" | lp

To download and install the CUPS printer driver manually, run the following commands:

sudo apt -y install libcups2-dev
git clone https://github.com/clockworkpi/DevTerm.git
cd DevTerm/devterm_thermal_printer_cups
make
sudo make install
lpoptions -d devterm_printer

PICO-8 does not have any built-in printing capability. OR DOES IT?? (video)

... Not exactly. For this little hack I wrote a Python script that runs in the background and waits for you to EXPORT XXX.LUA.PNG from PICO-8. When you do this, PICO-8 generates a PNG image of the contents of the source code editor in the PICO-8 font and colors. The Python script does some processing of the image to convert it to black text on a white background, then sends it to the thermal printer.

This hack works even if the contents of the source code editor isn't actually code, so you could use it to print grocery lists or whatever from PICO-8. You can experiment with the script to get different results. I chose elements such as the scaling (180%) mostly for visibility in the tweet video. This method cuts off the page about 1-1/2" in.

A small warning: during my experiments I had the thermal printer trying to print large blocks of dark color (black and grey). Not only is it lousy at this—the paper advance is not very accurate—it tends to trip the power fault circuitry and shut off the DevTerm. Stick to text and sparse images, or at least save your work.

  • To list pending print jobs: lpstat -o
  • To kill a specific print job: cancel <jobid>
  • To kill all pending print jobs: cancel -a devterm_printer

Conclusion

It's difficult to describe the Clockwork DevTerm as much more than a toy. But for nerds like me (and probably you) it's a fun toy. I'm looking forward to carrying this thing around town and doing nerdy nonsense with it. I like that it's a non-serious computer, so I'm encouraged to do non-serious things with it.

The non-seriousness of the thing makes it a serious contender as a PICO-8 development terminal. I wouldn't write prose on this keyboard, but I'd punch out short bursts of code and iterate on gameplay. The trackball isn't enough for major pixel art or map design, but add a portable USB mouse and you're good. It feels just right for PICO-8 music, if you use headphones. Now if only I could take the PICO-8 devkit tabs and spread them out across the ultra-wide screen...

There are dozens of RaspPi-based computer kits targeted at kids. I own several. I'd put DevTerm near the top of the list, if only because I can imagine someone with smaller hands getting more out of the keyboard. And unlike some others, DevTerm actually holds up as portable, compact, and even robust.

I'm excited about expansion capabilities. The open modular design is always rife with possibility, though it takes outside commitment to realize that potential. With a ribbon cable from the RaspPi GPIO connector out the back to a breakout board, DevTerm could become the centerpiece of a fully portable electronics experimentation kit, or a physics/biology/meteorology data gathering kit, or a computer architecture kit, or an appliance repair kit, or a wearable tech programming rig. Or you can use it to make games, that's good too.

For more photos including unboxing and assembly steps (and a few minor misadventures), see this Twitter thread.

P#96916 2021-09-06 03:39 ( Edited 2021-10-15 07:26)
[ :: Read More :: ]

Cart #rujazafape-0 | 2021-09-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#96930 2021-09-06 03:18
[ :: Read More :: ]

Cart #picofantasytactics_0_7-0 | 2021-09-20 | Code ▽ | Embed ▽ | No License

Changelog
now with movement!
now with health bars!
now with functioning items and stats!
now with functioning skills including the mighty FIRAGA!
now with multiple skills and animations!
now with improved dying!
now with attack and move in the same turn
now with FULLY FUNCTIONAL AOE ATTACK/SKILL SYSTEM!
now with CURE!
now with ordering based on character speed!
now with JOB SELECTION!!

planned features (prioritized)
todo: character progression (experience, levelling, and skill tree)
todo: enemy AI
todo: battle objective (kill all enemies or kill specific enemy)
todo: game intro screen
todo: battle intro screen
todo: non-attack skills (buffs, revive, slow, haste, protect, shell)
todo: status ailments (poison, sleep, silence)
todo: more content (monsters, skills, gear, and items)
todo: more content (battles, history)
todo: exit action menu to check out other characters
todo: UI to view characters stats and gear
todo: mission (kill enemy X to win battle)
todo: more advanced animations

P#96927 2021-09-06 01:19 ( Edited 2021-09-20 18:54)
[ :: Read More :: ]

Just my attempt at remaking final fantasy tactics.

Still very early!

P#96924 2021-09-06 00:29
[ :: Read More :: ]

This cart runs ok at first but fails when returned to from the breadcrumb.

Cart #fohekireba-0 | 2021-09-05 | Code ▽ | Embed ▽ | No License

code:

::_::
    cart='#'
    for i=1,5 do
        cart=cart..flr(rnd(10)) 
    end
    cls()
    print(cart,64-#cart*2,4)
    flip()
    load(cart,"leave "..cart)
goto _

There's no newline after "goto _", adding one fixed the issue.
This only happens on the bbs.

P#96917 2021-09-05 23:02
[ :: Read More :: ]

Cart #picokiller-3 | 2022-01-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

688i Pico Killer
By Ivan Joukov

Demake project of our good old "688(I) Hunter/Killer" by Jane's Combat Simulation.

Set a course and a speed on navigation screen to move. Try to be close enough to the enemy submarine hidden somewhere on the map to have a sonar contact. When you have a contact lock it on the sonar screen, stop your ship to stay in range and wait for your crew to calculate the firing solution. Once it's done launch your torpedo via the attack screen.

A red "!" in the top right of the screen indicates a contact, slow down and check your sonar. You'll lose contact, lock and firing solution if you go too far away from target.

Use Z / X buttons to switch tabs.
Direction arrows to use each screen.

WORK IN PROGRESS

P#96907 2021-09-05 20:35 ( Edited 2022-01-31 18:04)
[ :: Read More :: ]

I hope you like my first game ever.

Cart #dungeon_con-1 | 2021-09-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

P#96904 2021-09-05 19:29
[ :: Read More :: ]

Cart #noclipfinaleextended-0 | 2021-09-05 | Code ▽ | Embed ▽ | No License
4


Decided to extend Finale, and add a bit of a better animation. It evolves as the music goes on, so watch until the end. Enjoy!

P#96893 2021-09-05 13:35
[ :: Read More :: ]

Cart #wazazopidu-0 | 2021-09-04 | Code ▽ | Embed ▽ | No License
10


==Controls==
Move Left = Left Arrow Key
Move Right = Right Arrow Key
Jump = X
Stick = Z
Climb Ladder = Up & Down Arrow Keys

UPDATE 1.01: Thanks everyone for the feedback with this previous version( https://www.lexaloffle.com/bbs/?tid=44479 ). I updated the stick jump controls, they should be a lot easier to time the jumps now because the stick will now remain pointing down once the initial swing is complete. Also added the tap-to-turnaround-in-place function. Previously the player would move one tile if left or right was tapped. Lastly, the bridge level has been reworked(it was hastly put together the first time).

Please let me know what else is needed to tighten it up more and I'll try implementing it in the next update!

Also if anyone knows how to change which cart version is displayed by default, please let me know in the comments :)

---ABOUT---
STICK is a prototype of a simple platformer idea. The player character uses a walking stick to poke switches and help them make difficult jumps and avoid dangerous terrain. In this case the only dangerous terrains are spikes and falling off the screen.

I also threw in some collectable mushrooms for good measure that add to your score, as well as a timer that will give you a % bonus to your score if you're quick enough.

It's short, and has some occasional wonkiness which I'll be ironing out. But I'd love to get feedback regarding how the controls feel, especially opinions about the fact that I made the player character snap to grid in the x dimension, which I realize is an unusual choice for a platformer.

ElectricLemon
https://electriclemon.itch.io/

P#96871 2021-09-04 17:31 ( Edited 2021-09-04 17:34)
View Older Posts